from langchain.agents import load_tools
from langchain.agents import initialize_agent
from langchain.llms import OpenAI
from langchain.agents import AgentType

import os
os.environ['SERPAPI_API_KEY'] = '2fc1f14a8d82927afb2df4910f6235633739c9043a8f752233bb156c741c0536'
os.environ["OPENAI_API_KEY"] = "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"

llm = OpenAI()

tools = load_tools(["serpapi"])

# tools = load_tools(["serpapi", "llm-math"], llm=llm)

agent = initialize_agent(tools, llm, agent=AgentType.ZERO_SHOT_REACT_DESCRIPTION, verbose=True)

agent.run("What's the date today? What great events have taken place today in history?")
